<?php
namespace Controller;

/**
 * Created by PhpStorm.
 * User: lkk
 * Date: 2019/1/14
 * Time: 4:02 PM
 */
use Teemo\MVC\Controller;

class Index extends Controller
{

    public function index()
    {
        //通过context拿到$request
        $request = $this->request->getQueryParams();
        if (isset($request['sleep'])) {
            sleep(10);
        }
        return 'i am Index/index by Route! REQUEST:' . json_encode($request);
    }

    public function hello()
    {
        return $this->template->render('index.twig', [
            'name' => 'teemo baby!!!'
        ]);
    }

}

